This function does not alter the original image at all, it just displays a smaller size image, almost like a thumbnail.

just call this simple function through the image($image_location, $target_size)

=======================================================

<?php
function image($image_location, $target_size) {
$image = getimagesize($image_location);
if ($image[0]> $image[1]) { //Checks if the image is wider then taller
$percentage = ($target_size / $image[0]); //calculate the percentage
}
else //if the image is taller then wider
{
$percentage = ($target_size / $image[1]); //calculate the percentage
}
$width = round($image[0] * $percentage); //determine width
$height = round($image[1] * $percentage); //determine height
return "<img src=\"$image_location\" width=\"$width\" height=\"$height\">"; //returns HTML elements
};
echo image('/* $location */',/* $size */);
?>